package com.mall.db.dao;

import com.mall.db.domain.Schedule;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ScheduleDao {

    @Select({"<script> \n" +
            "select \n" +
            "d.job_name,d.job_group,d.job_class_name class_name,\n" +
            "t.trigger_group,t.trigger_name,t.trigger_state state,\n" +
            "c.cron_expression corn,c.time_zone_id time_zone\n" +
            " from qrtz_job_details d\n" +
            "join qrtz_triggers t\n" +
            "join qrtz_cron_triggers c\n" +
            "on d.job_name = t.job_name and t.trigger_name = c.trigger_name\n" +
            "and t.trigger_group = c.trigger_group where 1=1 \n" +
            "<if test='jobName!=null'> and d.job_name = #{jobName}</if> \n" +
            "</script>"})
    List<Schedule> find(Schedule jt);

}
